package com.wicket.okrcalc.biz.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrcalc.biz.service.dto.req.*;
import com.wicket.okrcalc.biz.service.dto.res.*;
import com.wicket.okrcalc.common.exception.BizException;
import com.wicket.okrcalc.common.util.CommonFunctionHelper;
import com.wicket.okrcalc.common.util.RedisUtil;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.wicket.okrcalc.biz.service.dto.common.TargetContentAchievementDockingDto;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrcalc.common.exception.Assert;
import com.wicket.okrcalc.biz.service.nb.NbAchievement;
import com.wicket.okrcalc.biz.service.DashboradStandardDataService;
import com.wicket.okrcalc.biz.service.TargetCalcService;
import com.wicket.okrcalc.biz.service.dto.common.DeptAchievementDockingDto;
import com.wicket.okrcalc.biz.service.AchievementDockService;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class AchievementServiceImpl
  implements com.wicket.okrcalc.biz.service.AchievementService {

  @Resource
  private RedisUtil redisUtil;
//@Resource
 //private MCustomFields5Service mCustomFields5Service;
@Resource
  private NbAchievement nbAchievement;
@Resource
  private DashboradStandardDataService dashboradStandardDataService;
@Resource
  private TargetCalcService targetCalcService;
@Resource
  private AchievementDockService achievementDockService;
//@Resource
 //private AchievementDockService achievementDockService;

/**
   * D4统计规划成果数(公共)[9299]
   * gen by moon at 7/1/2024, 6:42:24 PM
   */
  @Trace(operationName = "D4统计规划成果数(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public StatisticsTargetPlanAchievementNumComRespDto statisticsTargetPlanAchievementNumCom(StatisticsTargetPlanAchievementNumComReqDto reqDto){
    
      
      ImplementDashboardReceiveFieldRespDto receptionServiceRes_2 =null;
//步骤0: M4执行大屏接收字段 - implementDashboardReceiveField
     //ModelCode: receptionService
        ImplementDashboardReceiveFieldRespDto receptionServiceRes = null;
    ImplementDashboardReceiveFieldReqDto receptionServiceReq=new ImplementDashboardReceiveFieldReqDto();
  if(reqDto!=null){
      receptionServiceReq.setIsLastCycle(reqDto.getIsLastCycle());//SimpleFieldAssign//sourceId:1701715_1
receptionServiceReq.setIsLastObjective(reqDto.getIsLastObjective());//SimpleFieldAssign//sourceId:1913725_1
receptionServiceReq.setParentSubMidCycleType(reqDto.getParentSubMidCycleType());//SimpleFieldAssign//sourceId:1701726_1
receptionServiceReq.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:1707080_1
receptionServiceReq.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1701731_1
receptionServiceReq.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1701732_1
receptionServiceReq.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1701733_1
receptionServiceReq.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1701734_1
receptionServiceReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1787208_1
    }
  
    /*M4-接收入参字段[8856]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq.getIsLastCycle(),"D4统计规划成果数(公共)-M4-接收入参字段-是否末级周期不能为空",false);
Assert.isNull(receptionServiceReq.getParentSubMidCycleType(),"D4统计规划成果数(公共)-M4-接收入参字段-父子中周期类型不能为空",false);
Assert.isNull(receptionServiceReq.getCycleId(),"D4统计规划成果数(公共)-M4-接收入参字段-周期ID不能为空",false);
Assert.isNull(receptionServiceReq.getEvaObjTargetCycleId(),"D4统计规划成果数(公共)-M4-接收入参字段-被评对象目标周期ID不能为空",false);
Assert.isNull(receptionServiceReq.getTargetCycleContentTypeCode(),"D4统计规划成果数(公共)-M4-接收入参字段-关联目标内容类型编码不能为空",false);
Assert.isNull(receptionServiceReq.getTargetCycleContentId(),"D4统计规划成果数(公共)-M4-接收入参字段-关联目标内容ID不能为空",false);
Assert.isNull(receptionServiceReq.getEvaluationTemplateId(),"D4统计规划成果数(公共)-M4-接收入参字段-评价模板ID不能为空",false);
Assert.isNull(receptionServiceReq.getSpaceId(),"D4统计规划成果数(公共)-M4-接收入参字段-创建于空间ID不能为空",false);
      receptionServiceRes = nbAchievement.implementDashboardReceiveField(receptionServiceReq);
      
      
      
    
//步骤1: D4执行目标周期内容成果统计-规划或绩效 - implementTargetCycleAchievementStatisticsCom
     ImplementTargetCycleAchievementStatisticsComRespDto implementTargetCycleAchievementStatisticsComRespDto = null;
    ImplementTargetCycleAchievementStatisticsComReqDto implementTargetCycleAchievementStatisticsComReqDto=new ImplementTargetCycleAchievementStatisticsComReqDto();
  implementTargetCycleAchievementStatisticsComReqDto.setStatisticWrokCycleAchievementNumsScene("TARGET_CONT_SUB_CYCLE");//sourceId:1703044_1
implementTargetCycleAchievementStatisticsComReqDto.setEvaObjTypeCode("EVA_OBJECT");//sourceId:1700637_1
if(reqDto!=null){
      implementTargetCycleAchievementStatisticsComReqDto.setIsLastCycle(reqDto.getIsLastCycle());//SimpleFieldAssign//sourceId:1700635_1
implementTargetCycleAchievementStatisticsComReqDto.setParentSubMidCycleType(reqDto.getParentSubMidCycleType());//SimpleFieldAssign//sourceId:1700636_1
implementTargetCycleAchievementStatisticsComReqDto.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1700638_1
implementTargetCycleAchievementStatisticsComReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1700632_1
implementTargetCycleAchievementStatisticsComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1700640_1
implementTargetCycleAchievementStatisticsComReqDto.setIsLastObjective(reqDto.getIsLastObjective());//SimpleFieldAssign//sourceId:1913729_1
implementTargetCycleAchievementStatisticsComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1700633_1
implementTargetCycleAchievementStatisticsComReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1700634_1
    }
  
    /*D4执行目标周期内容成果统计-规划或绩效[9277]   */
    Assert.isNull(implementTargetCycleAchievementStatisticsComReqDto.getStatisticWrokCycleAchievementNumsScene(),"D4统计规划成果数(公共)-D4执行目标周期内容成果统计-规划或绩效-统计工作周期成果数场景不能为空",false);
Assert.isNull(implementTargetCycleAchievementStatisticsComReqDto.getIsLastCycle(),"D4统计规划成果数(公共)-D4执行目标周期内容成果统计-规划或绩效-是否末级周期不能为空",false);
Assert.isNull(implementTargetCycleAchievementStatisticsComReqDto.getParentSubMidCycleType(),"D4统计规划成果数(公共)-D4执行目标周期内容成果统计-规划或绩效-父子中周期类型不能为空",false);
Assert.isNull(implementTargetCycleAchievementStatisticsComReqDto.getEvaObjTypeCode(),"D4统计规划成果数(公共)-D4执行目标周期内容成果统计-规划或绩效-被评对象类型编码不能为空",false);
Assert.isNull(implementTargetCycleAchievementStatisticsComReqDto.getEvaObjTargetCycleId(),"D4统计规划成果数(公共)-D4执行目标周期内容成果统计-规划或绩效-被评对象目标周期ID不能为空",false);
Assert.isNull(implementTargetCycleAchievementStatisticsComReqDto.getTargetCycleContentTypeCode(),"D4统计规划成果数(公共)-D4执行目标周期内容成果统计-规划或绩效-关联目标内容类型编码不能为空",false);
Assert.isNull(implementTargetCycleAchievementStatisticsComReqDto.getTargetCycleContentId(),"D4统计规划成果数(公共)-D4执行目标周期内容成果统计-规划或绩效-关联目标内容ID不能为空",false);
Assert.isNull(implementTargetCycleAchievementStatisticsComReqDto.getEvaluationTemplateId(),"D4统计规划成果数(公共)-D4执行目标周期内容成果统计-规划或绩效-评价模板ID不能为空",false);
Assert.isNull(implementTargetCycleAchievementStatisticsComReqDto.getSpaceId(),"D4统计规划成果数(公共)-D4执行目标周期内容成果统计-规划或绩效-创建于空间ID不能为空",false);
      implementTargetCycleAchievementStatisticsComRespDto = dashboradStandardDataService.implementTargetCycleAchievementStatisticsCom(implementTargetCycleAchievementStatisticsComReqDto)/*vcase invoke isSameApp*/;
      
      
      
    
//步骤2: D4执行目标周期部门成果统计-规划 - statisticsDeptTargetCycleCycleAchievementNumsCom
     StatisticsDeptTargetCycleCycleAchievementNumsComRespDto statisticsDeptTargetCycleCycleAchievementNumsComRespDto = null;
    StatisticsDeptTargetCycleCycleAchievementNumsComReqDto statisticsDeptTargetCycleCycleAchievementNumsComReqDto=new StatisticsDeptTargetCycleCycleAchievementNumsComReqDto();
if(reqDto!=null){
      statisticsDeptTargetCycleCycleAchievementNumsComReqDto.setIsLastCycle(reqDto.getIsLastCycle());//SimpleFieldAssign//sourceId:1700649_1
statisticsDeptTargetCycleCycleAchievementNumsComReqDto.setParentSubMidCycleType(reqDto.getParentSubMidCycleType());//SimpleFieldAssign//sourceId:1700644_1
statisticsDeptTargetCycleCycleAchievementNumsComReqDto.setPeriodId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:1705451_1
statisticsDeptTargetCycleCycleAchievementNumsComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1700650_1
statisticsDeptTargetCycleCycleAchievementNumsComReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1700648_1
statisticsDeptTargetCycleCycleAchievementNumsComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1700645_1
statisticsDeptTargetCycleCycleAchievementNumsComReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1700646_1
    }
  
    /*D4执行目标周期部门成果统计-规划[9288]   */
    Assert.isNull(statisticsDeptTargetCycleCycleAchievementNumsComReqDto.getIsLastCycle(),"D4统计规划成果数(公共)-D4执行目标周期部门成果统计-规划-是否末级周期不能为空",false);
Assert.isNull(statisticsDeptTargetCycleCycleAchievementNumsComReqDto.getParentSubMidCycleType(),"D4统计规划成果数(公共)-D4执行目标周期部门成果统计-规划-父子中周期类型不能为空",false);
Assert.isNull(statisticsDeptTargetCycleCycleAchievementNumsComReqDto.getPeriodId(),"D4统计规划成果数(公共)-D4执行目标周期部门成果统计-规划-周期ID不能为空",false);
Assert.isNull(statisticsDeptTargetCycleCycleAchievementNumsComReqDto.getTargetCycleContentId(),"D4统计规划成果数(公共)-D4执行目标周期部门成果统计-规划-关联目标内容ID不能为空",false);
Assert.isNull(statisticsDeptTargetCycleCycleAchievementNumsComReqDto.getTargetCycleContentTypeCode(),"D4统计规划成果数(公共)-D4执行目标周期部门成果统计-规划-关联目标内容类型编码不能为空",false);
Assert.isNull(statisticsDeptTargetCycleCycleAchievementNumsComReqDto.getEvaluationTemplateId(),"D4统计规划成果数(公共)-D4执行目标周期部门成果统计-规划-冗余评价模板ID不能为空",false);
Assert.isNull(statisticsDeptTargetCycleCycleAchievementNumsComReqDto.getSpaceId(),"D4统计规划成果数(公共)-D4执行目标周期部门成果统计-规划-创建于空间ID不能为空",false);
      statisticsDeptTargetCycleCycleAchievementNumsComRespDto = targetCalcService.statisticsDeptTargetCycleCycleAchievementNumsCom(statisticsDeptTargetCycleCycleAchievementNumsComReqDto)/*vcase invoke isSameApp*/;
      
      
      
    
//步骤3: M4执行大屏接收字段 - implementDashboardReceiveField
     //ModelCode: receptionService
        ImplementDashboardReceiveFieldRespDto receptionServiceRes_1 = null;
    if(implementTargetCycleAchievementStatisticsComRespDto !=null){
          ImplementDashboardReceiveFieldReqDto receptionServiceReq_1=new ImplementDashboardReceiveFieldReqDto();
  if(implementTargetCycleAchievementStatisticsComRespDto!=null){
      receptionServiceReq_1.setAchievementStatisticsType(implementTargetCycleAchievementStatisticsComRespDto.getAchievementStatisticsType());//SimpleFieldAssign//sourceId:1703030_1
receptionServiceReq_1.setTargetContentCalcCount(implementTargetCycleAchievementStatisticsComRespDto.getCalcCount());//SimpleFieldAssign//sourceId:1701632_1
receptionServiceReq_1.setEvaObjEntityId(implementTargetCycleAchievementStatisticsComRespDto.getEvaObjEntityId());//SimpleFieldAssign//sourceId:1705773_1
receptionServiceReq_1.setTargetContentCode(implementTargetCycleAchievementStatisticsComRespDto.getEvaObjTargetCycleCode());//SimpleFieldAssign//sourceId:1705774_1
receptionServiceReq_1.setCycleId(implementTargetCycleAchievementStatisticsComRespDto.getCycleId());//SimpleFieldAssign//sourceId:1705859_1
receptionServiceReq_1.setCycleStartTime(implementTargetCycleAchievementStatisticsComRespDto.getCycleStartTime());//SimpleFieldAssign//sourceId:1705788_1
receptionServiceReq_1.setCycleEndTime(implementTargetCycleAchievementStatisticsComRespDto.getCycleEndTime());//SimpleFieldAssign//sourceId:1705789_1
    }
if(implementTargetCycleAchievementStatisticsComRespDto!= null&&  implementTargetCycleAchievementStatisticsComRespDto.getAchievementDockingList() !=null&& !CollectionUtil.isEmpty(implementTargetCycleAchievementStatisticsComRespDto.getAchievementDockingList())){
      receptionServiceReq_1.setTargetContentAchievementDockingList(implementTargetCycleAchievementStatisticsComRespDto.getAchievementDockingList().stream().map(item -> BeanUtil.toBean(item, TargetContentAchievementDockingDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1701670_1
    }
if(statisticsDeptTargetCycleCycleAchievementNumsComRespDto!=null){
      receptionServiceReq_1.setDeptCalcCount(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getCalcCount());//SimpleFieldAssign//sourceId:1701633_1
receptionServiceReq_1.setDeptCouEvaObjEntityId(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getEvaObjEntityId());//SimpleFieldAssign//sourceId:1706055_1
receptionServiceReq_1.setDeptEvaObjTypeCode(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getEvaObjTypeCode());//SimpleFieldAssign//sourceId:1815781_1
receptionServiceReq_1.setDeptCouEvaObjTargetCycleId(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1706056_1
receptionServiceReq_1.setDeptCouTargetCycleContentId(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1706057_1
receptionServiceReq_1.setDeptCouBelongToContentTypeCode(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getBelongToContentTypeCode());//SimpleFieldAssign//sourceId:1904750_1
receptionServiceReq_1.setDeptCouCycleStartTime(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getCycleStartTime());//SimpleFieldAssign//sourceId:1706058_1
receptionServiceReq_1.setDeptCouCycleEndTime(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getCycleEndTime());//SimpleFieldAssign//sourceId:1706059_1
    }
if(statisticsDeptTargetCycleCycleAchievementNumsComRespDto!= null&&  statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getAchievementDockingList() !=null&& !CollectionUtil.isEmpty(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getAchievementDockingList())){
      receptionServiceReq_1.setDeptAchievementDockingList(statisticsDeptTargetCycleCycleAchievementNumsComRespDto.getAchievementDockingList().stream().map(item -> BeanUtil.toBean(item, DeptAchievementDockingDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1701671_1
    }
  
    /*M4-接收出参字段[8856]  用于特殊方法接收上游入参。 */
    
      receptionServiceRes_1 = nbAchievement.implementDashboardReceiveField(receptionServiceReq_1);
      
      
      receptionServiceRes_2 = receptionServiceRes_1;
           }
    
StatisticsTargetPlanAchievementNumComRespDto retData = new StatisticsTargetPlanAchievementNumComRespDto();
  if(receptionServiceRes_2!=null){
      retData.setAchievementStatisticsType(receptionServiceRes_2.getAchievementStatisticsType());//SimpleFieldAssign//sourceId:1703032_1
retData.setTargetContentCalcCount(receptionServiceRes_2.getTargetContentCalcCount());//SimpleFieldAssign//sourceId:1701934_1
retData.setTarConCouEvaObjEntityId(receptionServiceRes_2.getEvaObjEntityId());//SimpleFieldAssign//sourceId:1705863_1
retData.setTarConCouTargetContentCode(receptionServiceRes_2.getTargetContentCode());//SimpleFieldAssign//sourceId:1705864_1
retData.setTarConCouCycleId(receptionServiceRes_2.getCycleId());//SimpleFieldAssign//sourceId:1705865_1
retData.setTarConCouCycleStartTime(receptionServiceRes_2.getCycleStartTime());//SimpleFieldAssign//sourceId:1705866_1
retData.setTarConCouCycleEndTime(receptionServiceRes_2.getCycleEndTime());//SimpleFieldAssign//sourceId:1705867_1
retData.setTargetContentAchievementDockingList(receptionServiceRes_2.getTargetContentAchievementDockingList().stream().map(item -> BeanUtil.toBean(item, TargetContentAchievementDockingDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1701936_1
retData.setDeptCalcCount(receptionServiceRes_2.getDeptCalcCount());//SimpleFieldAssign//sourceId:1701935_1
retData.setDeptCouEvaObjEntityId(receptionServiceRes_2.getDeptCouEvaObjEntityId());//SimpleFieldAssign//sourceId:1706073_1
retData.setDeptEvaObjTypeCode(receptionServiceRes_2.getDeptEvaObjTypeCode());//SimpleFieldAssign//sourceId:1815783_1
retData.setDeptCouEvaObjTargetCycleId(receptionServiceRes_2.getDeptCouEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1706074_1
retData.setDeptCouTargetCycleContentId(receptionServiceRes_2.getDeptCouTargetCycleContentId());//SimpleFieldAssign//sourceId:1706075_1
retData.setDeptCouBelongToContentTypeCode(receptionServiceRes_2.getDeptCouBelongToContentTypeCode());//SimpleFieldAssign//sourceId:1904752_1
retData.setDeptCouCycleStartTime(receptionServiceRes_2.getDeptCouCycleStartTime());//SimpleFieldAssign//sourceId:1706076_1
retData.setDeptCouCycleEndTime(receptionServiceRes_2.getDeptCouCycleEndTime());//SimpleFieldAssign//sourceId:1706077_1
retData.setDeptAchievementDockingList(receptionServiceRes_2.getDeptAchievementDockingList().stream().map(item -> BeanUtil.toBean(item, DeptAchievementDockingDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1701937_1
    }




return retData;
    }
/**
   * D4统计目标内容及所属主体成果数(公共)[9351]
   * gen by moon at 4/7/2024, 9:17:05 AM
   */
  @Trace(operationName = "D4统计目标内容及所属主体成果数(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public StatisticsTargetContAndOwnerAchievementsComRespDto statisticsTargetContAndOwnerAchievementsCom(StatisticsTargetContAndOwnerAchievementsComReqDto reqDto){


      if((reqDto!= null&&  reqDto.getIsOpenSymbolicAchievements() !=null && reqDto.getIsOpenSymbolicAchievements().equals("TRUE"))) {
        //if(D4统计目标内容及所属主体成果数(公共).是否开启标志性成果 等于 是)  66395

ImplementQueryAchievementByTypeOrGraceComRespDto implementQueryAchievementByTypeOrGraceComRespDto = null;
    ImplementQueryAchievementByTypeOrGraceComReqDto implementQueryAchievementByTypeOrGraceComReqDto=new ImplementQueryAchievementByTypeOrGraceComReqDto();
  if(reqDto!=null){
      implementQueryAchievementByTypeOrGraceComReqDto.setIsLastCycle(reqDto.getIsLastCycle());//SimpleFieldAssign//sourceId:1709707_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setStandardDataCalcCycleModel(reqDto.getStandardDataCalcCycleModel());//SimpleFieldAssign//sourceId:1709714_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setParentSubMidCycleType(reqDto.getParentSubMidCycleType());//SimpleFieldAssign//sourceId:1709708_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setWorkCycleUpdateSlice(reqDto.getWorkCycleUpdateSlice());//SimpleFieldAssign//sourceId:1709715_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setCalcStartTime(reqDto.getCalcStartTime());//SimpleFieldAssign//sourceId:1709716_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setUpdateCycleId(reqDto.getUpdateCycleId());//SimpleFieldAssign//sourceId:1709717_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setUpdateCycleStartTime(reqDto.getUpdateCycleStartTime());//SimpleFieldAssign//sourceId:1709718_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setUpdateCycleEndTime(reqDto.getUpdateCycleEndTime());//SimpleFieldAssign//sourceId:1709719_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setUpdateCycleTypeCode(reqDto.getUpdateCycleTypeCode());//SimpleFieldAssign//sourceId:1709720_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setEventBatchUpdateCode(reqDto.getEventBatchUpdateCode());//SimpleFieldAssign//sourceId:1709721_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setFromContentTableTypeCode(reqDto.getFromContentTableTypeCode());//SimpleFieldAssign//sourceId:1709722_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setFromContentEntityId(reqDto.getFromContentEntityId());//SimpleFieldAssign//sourceId:1709723_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setTableTypeCode(reqDto.getTableTypeCode());//SimpleFieldAssign//sourceId:1709724_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:1709725_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1709713_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1709709_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1709710_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setBelongToContentTypeCode(reqDto.getBelongToContentTypeCode());//SimpleFieldAssign//sourceId:1709726_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setBelongToContentId(reqDto.getBelongToContentId());//SimpleFieldAssign//sourceId:1709727_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setPersonLiableObjId(reqDto.getPersonLiableObjId());//SimpleFieldAssign//sourceId:1709728_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setPersonLiableTypeCode(reqDto.getPersonLiableTypeCode());//SimpleFieldAssign//sourceId:1709729_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setBizRoleObjId(reqDto.getBizRoleObjId());//SimpleFieldAssign//sourceId:1709730_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setBizRoleObjCode(reqDto.getBizRoleObjCode());//SimpleFieldAssign//sourceId:1709731_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setBizRoleObjName(reqDto.getBizRoleObjName());//SimpleFieldAssign//sourceId:1709732_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setBelongToPersonalIdentityTypeCode(reqDto.getBelongToPersonalIdentityTypeCode());//SimpleFieldAssign//sourceId:1709733_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setBelongToPersonalIdentityId(reqDto.getBelongToPersonalIdentityId());//SimpleFieldAssign//sourceId:1709734_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1709711_1_66396
implementQueryAchievementByTypeOrGraceComReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1709712_1_66396
    }
  
    /*D4执行按成果类型或成果等级统计成果数(公共)[9294]   */
    Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getIsLastCycle(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-是否末级周期不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getStandardDataCalcCycleModel(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-本目标归属周期的计算周期五模型不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getParentSubMidCycleType(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-父子中周期类型不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getWorkCycleUpdateSlice(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-工作周期更新切片不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getCalcStartTime(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-计算开始时间不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getUpdateCycleId(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-更新周期ID不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getUpdateCycleStartTime(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-更新周期开始时间不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getUpdateCycleEndTime(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-更新周期结束时间不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getUpdateCycleTypeCode(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-更新周期类型标识不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getEventBatchUpdateCode(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-事务内数据更新批次标识不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getTableTypeCode(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-归属内容表类型编码不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getEntityId(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-归属内容表主键ID不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getEvaObjTargetCycleId(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-被评对象目标周期ID不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getTargetCycleContentId(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-关联目标内容ID不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getTargetCycleContentTypeCode(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-关联目标内容类型编码不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getEvaluationTemplateId(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-评价模板ID不能为空",false);
Assert.isNull(implementQueryAchievementByTypeOrGraceComReqDto.getSpaceId(),"D4统计目标内容及所属主体成果数(公共)-D4执行按成果类型或成果等级统计成果数(公共)-创建于空间ID不能为空",false);
      implementQueryAchievementByTypeOrGraceComRespDto = achievementDockService.implementQueryAchievementByTypeOrGraceCom(implementQueryAchievementByTypeOrGraceComReqDto)/*vcase invoke isSameApp*/;



      }
StatisticsTargetContAndOwnerAchievementsComRespDto retData = new StatisticsTargetContAndOwnerAchievementsComRespDto();



  
  
return retData;
  }
/**
   * D4统计绩效目标内容及所属主体成果数(公共)[9357]
   * gen by moon at 5/23/2024, 3:13:36 AM
   */
  @Trace(operationName = "D4统计绩效目标内容及所属主体成果数(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public StatisticsPerfTargetContAndOwnerAchievementsComRespDto statisticsPerfTargetContAndOwnerAchievementsCom(StatisticsPerfTargetContAndOwnerAchievementsComReqDto reqDto){


      if((reqDto!= null&&  reqDto.getIsOpenSymbolicAchievements() !=null && reqDto.getIsOpenSymbolicAchievements().equals("TRUE"))&&(reqDto!= null&&  reqDto.getParentSubMidCycleType() !=null && reqDto.getParentSubMidCycleType().equals("PARENT_CYCLE")||reqDto!= null&&  reqDto.getParentSubMidCycleType() !=null && reqDto.getParentSubMidCycleType().equals("SUB_CYCLE")||reqDto!= null&&  reqDto.getParentSubMidCycleType() !=null && reqDto.getParentSubMidCycleType().equals("MID_CYCLE"))) {
        //if(D4统计绩效目标内容及所属主体成果数(公共).是否开启标志性成果 等于 是 and (D4统计绩效目标内容及所属主体成果数(公共).父子中周期类型 等于 父周期 or D4统计绩效目标内容及所属主体成果数(公共).父子中周期类型 等于 子周期 or D4统计绩效目标内容及所属主体成果数(公共).父子中周期类型 等于 中期))  66452

ImplementPerfAchievementByTypeOrGraceComRespDto implementPerfAchievementByTypeOrGraceComRespDto = null;
    ImplementPerfAchievementByTypeOrGraceComReqDto implementPerfAchievementByTypeOrGraceComReqDto=new ImplementPerfAchievementByTypeOrGraceComReqDto();
  if(reqDto!=null){
      implementPerfAchievementByTypeOrGraceComReqDto.setIsLastCycle(reqDto.getIsLastCycle());//SimpleFieldAssign//sourceId:1714363_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setStandardDataCalcCycleModel(reqDto.getStandardDataCalcCycleModel());//SimpleFieldAssign//sourceId:1714364_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setParentSubMidCycleType(reqDto.getParentSubMidCycleType());//SimpleFieldAssign//sourceId:1714365_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setWorkCycleUpdateSlice(reqDto.getWorkCycleUpdateSlice());//SimpleFieldAssign//sourceId:1714366_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setCalcStartTime(reqDto.getCalcStartTime());//SimpleFieldAssign//sourceId:1714367_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setPreviousCycleId(reqDto.getPreviousCycleId());//SimpleFieldAssign//sourceId:1801410_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setLastEvaObjTargetCycleId(reqDto.getLastEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1801415_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setPreUpdateCycleId(reqDto.getPreUpdateCycleId());//SimpleFieldAssign//sourceId:1801416_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setUpdateCycleId(reqDto.getUpdateCycleId());//SimpleFieldAssign//sourceId:1714368_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setUpdateCycleStartTime(reqDto.getUpdateCycleStartTime());//SimpleFieldAssign//sourceId:1714369_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setUpdateCycleEndTime(reqDto.getUpdateCycleEndTime());//SimpleFieldAssign//sourceId:1714370_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setUpdateCycleTypeCode(reqDto.getUpdateCycleTypeCode());//SimpleFieldAssign//sourceId:1714371_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1714372_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1714373_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1714374_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setEventBatchUpdateCode(reqDto.getEventBatchUpdateCode());//SimpleFieldAssign//sourceId:1714375_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setFromContentTableTypeCode(reqDto.getFromContentTableTypeCode());//SimpleFieldAssign//sourceId:1714376_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setFromContentEntityId(reqDto.getFromContentEntityId());//SimpleFieldAssign//sourceId:1714377_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setTableTypeCode(reqDto.getTableTypeCode());//SimpleFieldAssign//sourceId:1714378_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:1714379_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setBelongToContentTypeCode(reqDto.getBelongToContentTypeCode());//SimpleFieldAssign//sourceId:1714380_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setBelongToContentId(reqDto.getBelongToContentId());//SimpleFieldAssign//sourceId:1714381_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setPersonLiableObjId(reqDto.getPersonLiableObjId());//SimpleFieldAssign//sourceId:1714384_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setPersonLiableTypeCode(reqDto.getPersonLiableTypeCode());//SimpleFieldAssign//sourceId:1714385_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setBizRoleObjId(reqDto.getBizRoleObjId());//SimpleFieldAssign//sourceId:1714386_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setBizRoleObjCode(reqDto.getBizRoleObjCode());//SimpleFieldAssign//sourceId:1714387_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setBizRoleObjName(reqDto.getBizRoleObjName());//SimpleFieldAssign//sourceId:1714388_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setBelongToPersonalIdentityId(reqDto.getBelongToPersonalIdentityId());//SimpleFieldAssign//sourceId:1714383_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setBelongToPersonalIdentityRoleCode(reqDto.getBelongToPersonalIdentityRoleCode());//SimpleFieldAssign//sourceId:1806949_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setBelongToPersonalIdentityTypeCode(reqDto.getBelongToPersonalIdentityTypeCode());//SimpleFieldAssign//sourceId:1714382_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1714389_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1714390_1_66456
implementPerfAchievementByTypeOrGraceComReqDto.setOperationInductionId(reqDto.getOperationInductionId());//SimpleFieldAssign//sourceId:1814652_1_66456
    }

    /*D4执行绩效按成果类型或成果等级统计成果数(公共)[9358]   */
    Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getIsLastCycle(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-是否末级周期不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getStandardDataCalcCycleModel(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-本目标归属周期的计算周期五模型不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getParentSubMidCycleType(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-父子中周期类型不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getWorkCycleUpdateSlice(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-工作周期更新切片不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getCalcStartTime(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-计算开始时间不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getUpdateCycleId(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-更新周期ID不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getUpdateCycleStartTime(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-更新周期开始时间不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getUpdateCycleEndTime(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-更新周期结束时间不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getUpdateCycleTypeCode(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-更新周期类型标识不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getEvaObjTargetCycleId(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-被评对象目标周期ID不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getTargetCycleContentTypeCode(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-关联目标内容类型编码不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getTargetCycleContentId(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-关联目标内容ID不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getEventBatchUpdateCode(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-事务内数据更新批次标识不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getTableTypeCode(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-归属内容表类型编码不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getEntityId(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-归属内容表主键ID不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getBelongToContentTypeCode(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-数据归属内容表类型编码不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getBelongToContentId(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-数据归属内容表主键ID不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getBelongToPersonalIdentityId(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-数据归属对象ID不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getBelongToPersonalIdentityTypeCode(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-数据归属对象类型编码不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getEvaluationTemplateId(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-评价模板ID不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getSpaceId(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-创建于空间ID不能为空",false);
Assert.isNull(implementPerfAchievementByTypeOrGraceComReqDto.getOperationInductionId(),"D4统计绩效目标内容及所属主体成果数(公共)-D4执行绩效按成果类型或成果等级统计成果数(公共)-操作人就职记录ID不能为空",false);
      implementPerfAchievementByTypeOrGraceComRespDto = achievementDockService.implementPerfAchievementByTypeOrGraceCom(implementPerfAchievementByTypeOrGraceComReqDto)/*vcase invoke isSameApp*/;



      }
StatisticsPerfTargetContAndOwnerAchievementsComRespDto retData = new StatisticsPerfTargetContAndOwnerAchievementsComRespDto();





return retData;
  }
  //
}
